<template>
	<view>
		<star-nav :type="3" :title="setType(type)" icon="/static/icon-images/rocket.png"></star-nav>

		<star-rules ref="rulesRef" :type="type"></star-rules>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: 1, //1,飞机规则  2,市场规则 3,转赠规则
			}
		},
		onLoad(option) {
			console.log('option:',option);
			this.type = option.type*1
			setTimeout(() => {
				this.getrules(option.type)
			}, 500)
		},
		methods: {
			setType(type) {
				console.log('type111:',type);
				switch (type) {
					case 1:
						return '飞机规则'
						break;
					case 2:
						return '市场规则'
						break;
					case 3:
						return '转赠规则'
						break;
				}
			},
			getrules() {
				this.$refs.rulesRef.getrulList()
			}
		}
	}
</script>

<style lang="scss">
	page {
		width: 100%;
		height: 100vh;
		background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
	}

	.content {
		padding: 20rpx;
	}

	.mt-20 {
		margin-top: 20rpx;
	}
</style>